   var tabs = function (obj,style,status,mouseEvent){
       this.obj = this.getId(obj);
       this.lis = this.obj.getElementsByTagName("a");
       this.current = null;
       this.currentStyle = style;
       this.status = (status ? status-1 : 0);
       this.mouseEvent = mouseEvent;
       this.init();
   }
   tabs.prototype={ 
       init:function (){
         var that = this;
         for (var i=this.lis.length-1; i>=0; i--) {
              if( !/#/.test(this.getUrl(this.lis[i]))) { continue } ;
              var target = this.getUrl(this.lis[i]).match(/#(.*)/)[1];
              this.getId( target ).style.display = 'none';
              this.lis[i]['on'+that.mouseEvent] = function (e){that.change(this,e);} 
              this.lis[i]['onfocus'] = function (){this.blur()};
         }
         this.showCurrent(this.lis[this.status]);
       },
       change : function (t,e){
           if(t == this.current){this.stopDefault(e); return false };
           this.removeCurrent(this.current);
           this.showCurrent(t);
           this.stopDefault(e);
       },
       removeCurrent : function (t){
           this.cssjs('remove',t,this.currentStyle);
           var target = this.getUrl(t).match(/#(.*)/)[1];
           this.getId(target).style.display = 'none';   
       },
       showCurrent : function (t){
           var target = this.getUrl(t).match(/#(.*)/)[1];    
           this.getId( target ).style.display = 'block';
           this.current = t;
           this.cssjs('add',t,this.currentStyle);      
       },
       getId : function (elem){
           return document.getElementById(elem);
       },
       getUrl : function (o){
           return o.getAttribute('href',2).toString()
       },
       cssjs : function (a,o,c1){
           switch (a){
               case 'add' : if(!this.cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;}
               break;
               case 'remove' : var rep=o.className.match(' '+c1)?' '+c1:c1 ; o.className=o.className.replace(rep,'');
               break;
           }
       },
       stopDefault : function (e){
           if ( e && e.preventDefault )
               e.preventDefault();
           else
               window.event.returnValue = false;
           return false;
       }
  }